
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>7.1.3 声音 · 命令进阶</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../loot-table.html" />
    
    
    <link rel="prev" href="models.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    引言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../concepts/concepts.html">
            
                <a href="../../concepts/concepts.html">
            
                    
                    1 基础概念
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../../concepts/space.html">
            
                <a href="../../concepts/space.html">
            
                    
                    1.1 坐标、朝向、区块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../../concepts/time.html">
            
                <a href="../../concepts/time.html">
            
                    
                    1.2 时间、顺序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../../concepts/execution.html">
            
                <a href="../../concepts/execution.html">
            
                    
                    1.3 命令执行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../../concepts/selector/selector.html">
            
                <a href="../../concepts/selector/selector.html">
            
                    
                    1.4 目标选择器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../../concepts/stats.html">
            
                <a href="../../concepts/stats.html">
            
                    
                    1.5 命令执行统计
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../common-format/common-format.html">
            
                <a href="../../common-format/common-format.html">
            
                    
                    2 常用命令格式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../common-format/json/json.html">
            
                <a href="../../common-format/json/json.html">
            
                    
                    2.1 JSON文本
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="../../common-format/json/type.html">
            
                <a href="../../common-format/json/type.html">
            
                    
                    2.1.1 JSON文本类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.2" data-path="../../common-format/json/formatting.html">
            
                <a href="../../common-format/json/formatting.html">
            
                    
                    2.1.2 JSON样式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.3" data-path="../../common-format/json/event.html">
            
                <a href="../../common-format/json/event.html">
            
                    
                    2.1.3 JSON事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.4" data-path="../../common-format/json/array.html">
            
                <a href="../../common-format/json/array.html">
            
                    
                    2.1.4 JSON分项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.5" data-path="../../common-format/json/sign-book.html">
            
                <a href="../../common-format/json/sign-book.html">
            
                    
                    2.1.5 告示牌及成书
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.6" data-path="../../common-format/json/other.html">
            
                <a href="../../common-format/json/other.html">
            
                    
                    2.1.6 杂项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.7" data-path="../../common-format/json/keys.html">
            
                <a href="../../common-format/json/keys.html">
            
                    
                    2.1.A 附录: keybind列表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../common-format/nbt/nbt.html">
            
                <a href="../../common-format/nbt/nbt.html">
            
                    
                    2.2 NBT及结构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="../../common-format/nbt/simple.html">
            
                <a href="../../common-format/nbt/simple.html">
            
                    
                    2.2.1 基本类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="../../common-format/nbt/example.html">
            
                <a href="../../common-format/nbt/example.html">
            
                    
                    2.2.2 NBT实战
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../command/command.html">
            
                <a href="../../command/command.html">
            
                    
                    3 如何执行命令
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../../command/chat.html">
            
                <a href="../../command/chat.html">
            
                    
                    3.1 聊天栏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../../command/cb.html">
            
                <a href="../../command/cb.html">
            
                    
                    3.2 命令方块简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../../command/function.html">
            
                <a href="../../command/function.html">
            
                    
                    3.3 命令函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../scoreboard/scoreboard.html">
            
                <a href="../../scoreboard/scoreboard.html">
            
                    
                    4 记分板
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../../scoreboard/objective.html">
            
                <a href="../../scoreboard/objective.html">
            
                    
                    4.1 记分板变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../../scoreboard/team.html">
            
                <a href="../../scoreboard/team.html">
            
                    
                    4.2 记分板队伍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../../scoreboard/tag.html">
            
                <a href="../../scoreboard/tag.html">
            
                    
                    4.3 记分板标签
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../../scoreboard/command.html">
            
                <a href="../../scoreboard/command.html">
            
                    
                    4.4 记分板命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../../scoreboard/example.html">
            
                <a href="../../scoreboard/example.html">
            
                    
                    4.5 记分板实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.1" data-path="../../scoreboard/examples/example1.html">
            
                <a href="../../scoreboard/examples/example1.html">
            
                    
                    4.5.1 循环电路|记分板的基础操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.2" data-path="../../scoreboard/examples/example2.html">
            
                <a href="../../scoreboard/examples/example2.html">
            
                    
                    4.5.2 自定义命令|stats与记分板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3" data-path="../../scoreboard/examples/example3.html">
            
                <a href="../../scoreboard/examples/example3.html">
            
                    
                    4.5.3 击杀率|operation与准则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.4" data-path="../../scoreboard/examples/example4.html">
            
                <a href="../../scoreboard/examples/example4.html">
            
                    
                    4.5.4 漂亮的排名|显示与队伍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.5" data-path="../../scoreboard/examples/example5.html">
            
                <a href="../../scoreboard/examples/example5.html">
            
                    
                    4.5.5 简单登入系统|function与综合运用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../../logic/logic.html">
            
                <a href="../../logic/logic.html">
            
                    
                    5 基础逻辑
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../logic/enum.html">
            
                <a href="../../logic/enum.html">
            
                    
                    5.1 穷举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../logic/score.html">
            
                <a href="../../logic/score.html">
            
                    
                    5.2 分数处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../logic/bool.html">
            
                <a href="../../logic/bool.html">
            
                    
                    5.3 布尔逻辑
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../../logic/loop.html">
            
                <a href="../../logic/loop.html">
            
                    
                    5.4 循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../../logic/event.html">
            
                <a href="../../logic/event.html">
            
                    
                    5.5 事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../../logic/marker.html">
            
                <a href="../../logic/marker.html">
            
                    
                    5.6 实体Marker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../../logic/execute.html">
            
                <a href="../../logic/execute.html">
            
                    
                     5.7 execute进阶
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../../practise/practise.html">
            
                <a href="../../practise/practise.html">
            
                    
                    6 实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../../practise/objects.html">
            
                <a href="../../practise/objects.html">
            
                    
                    6.1 游戏内物件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../../practise/test-debug.html">
            
                <a href="../../practise/test-debug.html">
            
                    
                    6.2 命令系统测试及调试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../../practise/examples/examples.html">
            
                <a href="../../practise/examples/examples.html">
            
                    
                    6.3 更多命令系统例子
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="../../practise/examples/furnace.html">
            
                <a href="../../practise/examples/furnace.html">
            
                    
                    6.3.1 熔炉过热系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="../../practise/examples/badapple.html">
            
                <a href="../../practise/examples/badapple.html">
            
                    
                    6.3.2 毒苹果
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="../../practise/examples/rain.html">
            
                <a href="../../practise/examples/rain.html">
            
                    
                    6.3.3 下雨检测
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.4" data-path="../../practise/examples/chest_replace.html">
            
                <a href="../../practise/examples/chest_replace.html">
            
                    
                    6.3.4 替换方块实体
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.5" data-path="../../practise/examples/skill.html">
            
                <a href="../../practise/examples/skill.html">
            
                    
                    6.3.5 技能系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.6" data-path="../../practise/examples/crown.html">
            
                <a href="../../practise/examples/crown.html">
            
                    
                    6.3.6 皇冠系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.7" data-path="../../practise/examples/blackhole.html">
            
                <a href="../../practise/examples/blackhole.html">
            
                    
                    6.3.7 黑洞
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.8" data-path="../../practise/examples/login.html">
            
                <a href="../../practise/examples/login.html">
            
                    
                    6.3.8 登录系统
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../data-files.html">
            
                <a href="../data-files.html">
            
                    
                    7 游戏文件的使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="resourcepack.html">
            
                <a href="resourcepack.html">
            
                    
                    7.1 资源包
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1.1" data-path="textures.html">
            
                <a href="textures.html">
            
                    
                    7.1.1 材质
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.1.2" data-path="models.html">
            
                <a href="models.html">
            
                    
                    7.1.2 模型
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.8.1.3" data-path="sound.html">
            
                <a href="sound.html">
            
                    
                    7.1.3 声音
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../loot-table.html">
            
                <a href="../loot-table.html">
            
                    
                    7.2 Loot table
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../advancements/advancements.html">
            
                <a href="../advancements/advancements.html">
            
                    
                    7.3 Advancement
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.3.1" data-path="../advancements/examples.html">
            
                <a href="../advancements/examples.html">
            
                    
                    Advancement例子
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" >
            
                <span>
            
                    
                    8 杂项
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <a target="_blank" href="https://commandtutorials.neocities.org/">
            
                    
                    8.1 其他资源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../../misc/success.html">
            
                <a href="../../misc/success.html">
            
                    
                    8.2 如何成为一个成功的CBer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../../misc/question.html">
            
                <a href="../../misc/question.html">
            
                    
                    8.3 问问题的技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="../../misc/quotes.html">
            
                <a href="../../misc/quotes.html">
            
                    
                    8.4 其他CBer的建言
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >7.1.3 声音</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x97F3;&#x6548;">&#x97F3;&#x6548;</h1>
<p>&#x97F3;&#x6548;(Sounds)&#x6587;&#x4EF6;&#x50A8;&#x5B58;&#x5728;<code>(&#x8D44;&#x6E90;&#x5305;&#x540D;)/assets/minecraft/sounds</code>&#x4E2D;&#x3002;&#x5982;&#x679C;&#x4F60;&#x6CA1;&#x6709;&#x627E;&#x5230;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x81EA;&#x5DF1;&#x521B;&#x5EFA;&#x3002;</p>
<p>&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x4EE5;<code>*.ogg</code>&#x7684;&#x683C;&#x5F0F;&#x50A8;&#x5B58;&#x3002;&#x9700;&#x8981;&#x7528;&#x8F6C;&#x6362;&#x8F6F;&#x4EF6;&#xFF08;&#x7F51;&#x4E0A;&#x5F88;&#x591A;&#xFF09;&#x5BF9;&#x5176;&#x5B83;&#x683C;&#x5F0F;&#x7684;&#x97F3;&#x6548;&#x8FDB;&#x884C;&#x8F6C;&#x6362;&#x3002;</p>
<p>&#x540C;&#x65F6;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;<code>playsound</code>&#x547D;&#x4EE4;&#x6765;&#x64AD;&#x653E;&#x4EFB;&#x610F;&#x97F3;&#x6548;&#xFF0C;&#x6765;&#x589E;&#x8FDB;&#x6E38;&#x620F;&#x6C14;&#x6C1B;&#xFF0C;&#x8FBE;&#x5230;&#x7279;&#x6B8A;&#x6548;&#x679C;&#xFF08;&#x67AA;&#x58F0;&#xFF0C;&#x62FE;&#x53D6;&#x97F3;&#x6548;&#x7B49;&#xFF09;&#x3002;</p>
<h2 id="&#x539F;&#x7248;&#x97F3;&#x6548;">&#x539F;&#x7248;&#x97F3;&#x6548;</h2>
<h3 id="&#x66FF;&#x6362;&#x539F;&#x7248;&#x97F3;&#x6548;">&#x66FF;&#x6362;&#x539F;&#x7248;&#x97F3;&#x6548;</h3>
<p>&#x82E5;&#x8981;&#x66FF;&#x6362;&#x539F;&#x7248;&#x7684;&#x97F3;&#x6548;&#xFF0C;&#x8BF7;&#x53C2;&#x7167;&#x4EE5;&#x4E0B;&#x7F51;&#x5740;&#xFF0C;&#x6309;&#x7167;&#x6811;&#x72B6;&#x56FE;&#x521B;&#x5EFA;&#x6587;&#x4EF6;&#x5939;&#x6216;&#x547D;&#x540D;ogg&#x6587;&#x4EF6;&#x3002;<br>sounds &#x6587;&#x4EF6;&#x5939;&#x987A;&#x5E8F;&#xFF1A;<a href="http://minecraft.gamepedia.com/Resource_pack/Folders" target="_blank">http://minecraft.gamepedia.com/Resource_pack/Folders</a>  </p>
<p>&#x539F;&#x7248;sounds&#x6587;&#x4EF6;&#x5939;&#x4E0B;&#x8F7D;&#x3002;&#x53EF;&#x76F4;&#x63A5;&#x653E;&#x5165;&#x8D44;&#x6E90;&#x5305;&#x4E2D;&#xFF0C;&#x66FF;&#x6362;&#x9700;&#x8981;&#x7684;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x3002;&#xFF08;&#x611F;&#x8C22; pca006132 &#x7684;&#x63D0;&#x4F9B;&#xFF09;<br><a href="http://pan.baidu.com/s/1pLNpgPd" target="_blank">http://pan.baidu.com/s/1pLNpgPd</a>  </p>
<h3 id="&#x63D0;&#x53D6;&#x539F;&#x7248;&#x97F3;&#x6548;">&#x63D0;&#x53D6;&#x539F;&#x7248;&#x97F3;&#x6548;</h3>
<p>&#x539F;&#x7248;&#x7684;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x5B58;&#x653E;&#x5728;<code>(&#x6E38;&#x620F;&#x76EE;&#x5F55;)/.minecraft/assets</code>&#x4E0B;</p>
<ul>
<li><code>indexes</code>&#x6587;&#x4EF6;&#x5939;&#x50A8;&#x5B58;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x7684;&#x7D22;&#x5F15;&#x3002;</li>
<li><code>objects</code>&#x6587;&#x4EF6;&#x5939;&#x50A8;&#x5B58;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x3002;</li>
</ul>
<p>&#x6253;&#x5F00;indexes&#x6587;&#x4EF6;&#x5939;&#x4E2D;<code>(&#x7248;&#x672C;&#x53F7;).json</code>&#xFF1A;</p>
<pre><code>{
  &quot;objects&quot;: {
    &quot;minecraft/sounds/mob/stray/death2.ogg&quot;: {
      &quot;hash&quot;: &quot;d48940aeab2d4068bd157e6810406c882503a813&quot;,
      &quot;size&quot;: 18817
    },
    &quot;minecraft/sounds/mob/husk/step4.ogg&quot;: {
      &quot;hash&quot;: &quot;70a1c99c314a134027988106a3b61b15389d5f2f&quot;,
      &quot;size&quot;: 9398
    },
 ...
</code></pre><p>&#x7A0D;&#x4F5C;&#x5206;&#x6790;&#x53EF;&#x4EE5;&#x5F97;&#x77E5;&#xFF0C;</p>
<blockquote>
<p>&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;&#xFF1A;<code>(&#x8D44;&#x6E90;&#x5305;&#x540D;)/assets/minecraft/sounds/mob/stray/death2.ogg</code><br>hash &#x503C;&#xFF1A;<code>d48940aeab2d4068bd157e6810406c882503a813</code><br>&#x6587;&#x4EF6;&#x5927;&#x5C0F;&#xFF1A;<code>18817 B</code></p>
</blockquote>
<p>&#x77E5;&#x9053;&#x8FD9;&#x4E9B;&#x4FE1;&#x606F;&#x540E;&#xFF0C;&#x6211;&#x4EEC;&#x5C31;&#x53EF;&#x4EE5;&#x5728;objects&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x5BFB;&#x627E;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x4E86;&#x3002;</p>
<ul>
<li>1.&#x53D6; hash &#x503C;&#x7684;&#x524D;&#x4E24;&#x4F4D;&#x4F5C;&#x4E3A;objects&#x6587;&#x4EF6;&#x5939;&#x7684;&#x4E8C;&#x7EA7;&#x76EE;&#x5F55;&#x3002;&#xFF08;&#x5982;<code>sounds/mob/stray/death2.ogg</code>&#x7684;hash&#x503C;&#x524D;&#x4E24;&#x4F4D;&#x662F;<code>d4</code>&#xFF0C;&#x90A3;&#x4E48;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x5C31;&#x5728;<code>objects/d4</code>&#x4E2D;&#xFF09;</li>
<li>2.&#x627E;&#x5230;&#x4EE5;hash&#x503C;&#x547D;&#x540D;&#x7684;&#x6587;&#x4EF6;&#xFF0C;&#x4FEE;&#x6539;&#x6269;&#x5C55;&#x540D;&#x4E3A;ogg&#x5219;&#x4E3A;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x3002;</li>
</ul>
<p>&#x540C;&#x7406;&#xFF0C;<code>sounds/mob/husk/step4.ogg</code>&#x5219;&#x662F;<code>objects/70/70a1c99c314a134027988106a3b61b15389d5f2f</code>&#x6587;&#x4EF6;&#x3002;</p>
<h2 id="&#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x97F3;&#x6548;">&#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x97F3;&#x6548;</h2>
<p>&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x97F3;&#x6548;&#x5B58;&#x653E;&#x5728;<code>(&#x8D44;&#x6E90;&#x5305;&#x540D;)/assets/minecraft/sounds</code>&#x4E2D;&#xFF0C;&#x4EE5;*.ogg&#x683C;&#x5F0F;&#x4FDD;&#x5B58;&#xFF0C;&#x6587;&#x4EF6;&#x540D;&#x968F;&#x610F;&#xFF0C;&#x4F46;&#x8981;&#x548C;<code>sounds.json</code>&#x6587;&#x4EF6;&#x5BF9;&#x5E94;&#x3002;</p>
<h3 id="soundsjson-&#x6587;&#x4EF6;">sounds.json &#x6587;&#x4EF6;</h3>
<p><code>sounds.json</code>&#x6587;&#x4EF6;&#x50A8;&#x5B58;<code>(&#x8D44;&#x6E90;&#x5305;&#x540D;)/assets/minecraft</code>&#x4E0B;&#x3002;&#x5982;&#x679C;&#x6709;&#x81EA;&#x5B9A;&#x4E49;&#x97F3;&#x6548;&#xFF0C;&#x5C31;&#x9700;&#x8981;&#x81EA;&#x5DF1;&#x521B;&#x5EFA;&#x6B64;&#x6587;&#x4EF6;&#x3002;</p>
<p>&#x4E3B;&#x8981;JSON&#x683C;&#x5F0F;&#xFF1A;</p>
<ul>
<li><code>(The root object)</code>(Compound)<ul>
<li><code>(A sound event)</code>&#xFF1A;&#x5355;&#x4E2A;&#x97F3;&#x6548;&#x4E8B;&#x4EF6;&#xFF0C;&#x6807;&#x7B7E;&#x540D;&#x79F0;&#x4E3A;&#x97F3;&#x6548;&#x65F6;&#x95F4;&#x540D;&#x79F0;&#x3002;&#x786E;&#x5B9A;&#x97F3;&#x6548;&#x4E8B;&#x4EF6;(Sound Event)&#x540D;&#x3002;&#x901A;&#x5E38;&#x4E3A;<code>&#x50A8;&#x5B58;&#x8DEF;&#x5F84;.&#x6587;&#x4EF6;&#x540D;</code>&#x3002;&#x8BE6;&#x89C1;WIKI.(Compound)<ul>
<li><code>category</code>&#xFF1A;&#x89C4;&#x5B9A;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x7684;&#x79CD;&#x7C7B;&#xFF0C;&#x4EE5;&#x4FBF;&#x5728;&#x6E38;&#x620F;&#x4E2D;&#x4F7F;&#x7528;&#x3002;(String) *</li>
<li><code>sounds</code>&#xFF1A;&#x786E;&#x5B9A;&#x6B64;&#x97F3;&#x6548;&#x4E8B;&#x4EF6;&#x4F7F;&#x7528;&#x7684;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#xFF0C;&#x89E6;&#x53D1;&#x97F3;&#x6548;&#x4E8B;&#x4EF6;&#x540E;&#x968F;&#x673A;&#x9009;&#x53D6;&#x4E00;&#x4E2A;&#x97F3;&#x6548;&#x64AD;&#x653E;&#x3002;(List)<ul>
<li><code>(A sound file)</code>&#xFF1A;&#x5355;&#x4E2A;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x3002;(Compound)<ul>
<li><code>name</code>&#xFF1A;<code>assets/minecraft/sounds</code>&#x4E0B;&#x7684;&#x97F3;&#x6548;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;&#xFF08;&#x4E0D;&#x5305;&#x62EC;&#x6269;&#x5C55;&#x540D;&#xFF09;&#x3002;(String)</li>
<li><code>stream</code>&#xFF1A;&#x503C;&#x4E3A; <code>true/false</code>&#xFF0C;&#x786E;&#x5B9A;&#x97F3;&#x6548;&#x662F;&#x5426;&#x4EE5;&#x6D41;(Stream)&#x7684;&#x5F62;&#x5F0F;&#x4ECE;&#x6587;&#x4EF6;&#x4E2D;&#x8BFB;&#x53D6;&#x3002;&#x63A8;&#x8350;&#x8BBE;&#x7F6E;&#x4E3A;true&#x9632;&#x6B62;&#x97F3;&#x6548;&#x5361;&#x987F;&#x3002;&#x9ED8;&#x8BA4;&#x4E3A;false.(String)</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>&#x6CE8;&#x610F;&#xFF0C;<code>category</code>&#x6807;&#x7B7E;&#x53EA;&#x5141;&#x8BB8;&#x4EE5;&#x4E0B;&#x51E0;&#x4E2A;&#x503C;&#xFF1A;</p>
<ul>
<li>ambient</li>
<li>weather</li>
<li>player</li>
<li>neutral</li>
<li>hostile</li>
<li>block</li>
<li>record</li>
<li>music</li>
<li>master</li>
<li>voice</li>
</ul>
<p>&#x63A8;&#x8350;&#x9605;&#x8BFB;&#xFF1A;</p>
<blockquote>
<p>WIKI <a href="http://minecraft.gamepedia.com/Sounds.json" target="_blank">http://minecraft.gamepedia.com/Sounds.json</a></p>
</blockquote>
<h3 id="playsound-&#x547D;&#x4EE4;">playsound &#x547D;&#x4EE4;</h3>
<p>&#x4E3B;&#x8981;&#x683C;&#x5F0F;&#xFF1A;</p>
<pre><code>playsound &lt;sound&gt; &lt;source&gt; &lt;player&gt; [x] [y] [z] [volume] [pitch] [minimumVolume]
</code></pre><p>&#x5176;&#x4E2D;&#xFF0C;<code>&lt;sound&gt;</code>&#x662F;&#x97F3;&#x6548;&#x4E8B;&#x4EF6;&#x540D;&#xFF0C;&#x5373;&#x4E0A;&#x6587;<code>(A sound event)</code>&#x6807;&#x7B7E;&#x7684;&#x540D;&#x79F0;&#xFF0C;<br><code>&lt;source&gt;</code>&#x5219;&#x662F;&#x97F3;&#x6548;&#x79CD;&#x7C7B;&#xFF0C;&#x5373;&#x4E0A;&#x6587;<code>category</code>&#x6807;&#x7B7E;&#x7684;&#x503C;&#x3002;</p>
<p>&#x7B80;&#x5355;&#x7684;&#x4F8B;&#x5B50;&#xFF1A;<br>&#x73B0;&#x5728;&#x5728;<code>(&#x8D44;&#x6E90;&#x5305;&#x540D;)/assets/minecraft/sounds</code>&#x4E0B;&#x5B58;&#x6709;&#x4E00; <strong>&#x81EA;&#x5B9A;&#x4E49;&#x7684;</strong> &#x97F3;&#x6548;&#x6587;&#x4EF6;<code>european.ogg</code><br>&#x6211;&#x4EEC;&#x60F3;&#x8BA9;&#x5B83;&#x5728;&#x6E38;&#x620F;&#x4E2D;&#x64AD;&#x653E;&#xFF0C;&#x4F5C;&#x4E3A;&#x4E2D;&#x5956;&#x97F3;&#x6548;&#x3002;&#x90A3;&#x4E48;<code>assets/minecraft</code>&#x4E0B;&#x7684;<code>sounds.json</code>&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x5199;:</p>
<pre><code>{
    &quot;getprize&quot;: {
        &quot;category&quot;: &quot;record&quot;,
        &quot;sounds&quot;: [
            {
                &quot;name&quot;: &quot;european&quot;,
                &quot;stream&quot;: true
            }
        ]
    }
}
</code></pre><p>&#x7136;&#x540E;&#x5728;&#x6E38;&#x620F;&#x4E2D;&#xFF0C;&#x4F7F;&#x7528;<code>playsound</code>&#x547D;&#x4EE4;&#x5411;&#x73A9;&#x5BB6;<code>Steve</code>&#x64AD;&#x653E;&#xFF1A;</p>
<pre><code>playsound getprize record Steve
</code></pre><p>&#x8FD9;&#x6837;&#x73A9;&#x5BB6;<code>Steve</code>&#x5C31;&#x80FD;&#x542C;&#x5230;&#x4E2D;&#x5956;&#x540E;&#x7684;&#x97F3;&#x6548;&#x4E86;&#x3002;playsound&#x547D;&#x4EE4;&#x5176;&#x5B83;&#x90E8;&#x5206;&#x53C2;&#x6570;&#x7684;&#x4F5C;&#x7528;&#x53EF;&#x8BE6;&#x89C1;WIKI.</p>
<p>&#x63A8;&#x8350;&#x9605;&#x8BFB;&#xFF1A;</p>
<blockquote>
<p>WIKI <a href="http://minecraft.gamepedia.com/Commands#playsound" target="_blank">http://minecraft.gamepedia.com/Commands#playsound</a>   playsound&#x547D;&#x4EE4;</p>
</blockquote>
<p>&#x540C;&#x6837;&#xFF0C;&#x4E5F;&#x53EF;&#x4F7F;&#x7528;<code>stopsound</code>&#x547D;&#x4EE4;&#x5173;&#x95ED;&#x97F3;&#x6548;&#xFF1A;</p>
<pre><code>stopsound &lt;player&gt; [source] [sound]
</code></pre><p>&#x5176;&#x4E2D;&#x7684;<code>[source]</code>,<code>[sound]</code>&#x5FC5;&#x987B;&#x548C;<code>playsound</code>&#x547D;&#x4EE4;&#x4E2D;&#xFF08;&#x6216;sounds.json&#x4E2D;&#xFF09;&#x7684;&#x4E00;&#x81F4;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="models.html" class="navigation navigation-prev " aria-label="Previous page: 7.1.2 模型">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../loot-table.html" class="navigation navigation-next " aria-label="Next page: 7.2 Loot table">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"7.1.3 声音","level":"1.8.1.3","depth":3,"next":{"title":"7.2 Loot table","level":"1.8.2","depth":2,"path":"data-files/loot-table.md","ref":"data-files/loot-table.md","articles":[]},"previous":{"title":"7.1.2 模型","level":"1.8.1.2","depth":3,"path":"data-files/resourcepack/models.md","ref":"data-files/resourcepack/models.md","articles":[]},"dir":"ltr"},"config":{"plugins":["expandable-chapters","lb2br","-sharing"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"expandable-chapters":{},"lb2br":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"命令进阶","language":"en","gitbook":"*","description":"一份Minecraft命令教程"},"file":{"path":"data-files/resourcepack/sound.md","mtime":"2017-07-29T07:48:44.115Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-11-08T10:37:55.949Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

